package org.eenie.commonlib


import co.zsmb.rainbowcake.dagger.RainbowCakeComponent
import com.alibaba.android.arouter.launcher.ARouter
import com.eenie.common.base.BaseApplication
import org.eenie.commonlib.component.di.components.DaggerGlobalComponent
import org.eenie.commonlib.component.di.components.GlobalComponent
import org.eenie.commonlib.component.di.modules.GlobalModule


class App : BaseApplication() {

    private lateinit var mAppComponent: GlobalComponent

    override fun setupInjector() {

        mAppComponent = DaggerGlobalComponent
                .builder()
                .globalModule(GlobalModule(this))
                .build()
    }

    override val injector: RainbowCakeComponent get() = mAppComponent

    override fun onCreate() {
        super.onCreate()
        ARouter.openDebug()
        ARouter.openLog()
        ARouter.init(this)







    }
}